//
//  ImageItemCell.m
//  com.modada.new
//
//  Created by ferver7 on 2019/5/30.
//  Copyright © 2019 ferver7. All rights reserved.
//

#import "ImageItemCell.h"

@implementation ImageItemCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (void)setImgStr:(NSString *)imgStr{
    [self.imageLogo sd_setImageWithURL:[NSURL URLWithString:imgStr] placeholderImage:nil completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
        if (image.size.height>0) {
            CGFloat scale =  (kScreenWidth-20)/image.size.width;
            CGFloat scaleHeight = image.size.height*scale;
            //返回高度给controller
            self.getImageHeight(scaleHeight);
        }
    }];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
